import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart


smtp_server = 'smtp-mail.outlook.com'
smtp_port = 587

smtp = smtplib.SMTP(smtp_server, smtp_port)
smtp.starttls()  # 启用TLS加密
smtp.login('op@tagtimeasia.com', '26100672')


msg = MIMEMultipart()
msg['From'] = 'op@tagtimeasia.com'
msg['To'] = '2504880498@qq.com'
msg['Subject'] = 'Test Email from Python'

body = 'Hello, this is a test email sent from Python.'
msg.attach(MIMEText(body, 'plain'))

smtp.send_message(msg)
